package chapter3.No3_1_等待和通知机制.c等待通知机制的实现.demo3;

/**
 * Created by Administrator on 2016/11/16.
 */
public class ThreadB extends Thread {
    Object lock;

    public ThreadB(Object lock) {
        this.lock = lock;
    }

    @Override
    public void run() {
        synchronized (lock) {
            System.out.println("开始notify：" + System.currentTimeMillis());
            lock.notify();
            System.out.println("结束notify：" + System.currentTimeMillis());
        }
    }
}
